<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        
        //字符串转小数
      let num = parseFloat('19.25')
      console.log(num);
      console.log(typeof(num));

      
      
        //字符串转整数
      let num1 = parseInt('12.32')
      console.log(num1);
      console.log(typeof(num1))

      
        //对象转字符串
console.log(String(new Date()));
console.log(new Date().toString);
        //对象转数字
console.log(Number("hello"));//nan非数字
console.log(Number("12.32"));
        //执行命令
        console.log(2*2);
        console.log(eval(2*2));
        eval('let x = 100,y=100;console.log(x+y);')
        
    </script>
</body>
</html>